package com.ax.action.system;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.ax.service.TabConfigService;
import com.ax.utils.BaseAction;

@Controller("tabConfigAction")
public class TabConfigAction extends BaseAction {
   
	private TabConfigService tabConfigService;
	@Resource(name="tabConfigService")
	public void setTabConfigService(TabConfigService tabConfigService) {
		this.tabConfigService = tabConfigService;
	}

	public String find(){
		request.setAttribute("map",tabConfigService.findConfig());
		return "set";
	}
	
	public String update(){
		Map<String,String> map=new HashMap<String, String>();
		map.put("Author", request.getParameter("Author"));
		map.put("Source",request.getParameter("Source"));
		map.put("SoftEnvironment", request.getParameter("SoftEnvironment"));
		map.put("SoftLanguage", request.getParameter("SoftLanguage"));
		map.put("SoftImpower", request.getParameter("SoftImpower"));
		tabConfigService.updateConfig(map);
		return "list";
	}
}
